package main

import (
	"crypto/rc4"
	"io/ioutil"
)

func main() {
	myfile, _ := ioutil.ReadFile("cipher.dat")
	plaintext := make([]byte, len(myfile))
	key := make([]byte, 20)
	var i, j, k, mask uint64
	var p uint
	mask = 0x00000000000000ff
	for i = 0; i < 0xffffffff; i++ {
		for j = 0; j < 0xffffffffffffffff; j++ {
			for k = 0; k < 0xffffffffffffffff; k++ {
				for p = 0; p < 8; p++ {
					key[p] = byte(k & (mask << (p * 8)))
					key[p+8] = byte(j & (mask << (p * 8)))
				}
				key[16] = byte(i & mask << 0)
				key[17] = byte(i & mask << 8)
				key[18] = byte(i & mask << 16)
				key[19] = byte(i & mask << 24)
				ks, _ := rc4.NewCipher(key)
				ks.XORKeyStream(plaintext, myfile)
			}
		}
	}
}
